<?php echo $html->link(__('Create new slider'),'/admin/sliders/add',array('class'=>'add_button'));?>
<?php echo $html->link(__('Edit Zone'),'/admin/sliders/editZone',array('class'=>'add_button'));?>
<?php
$index->setData($slidersData,'Slider');
$index->setPaginateSeparator(' ');
$index->showFields(array('id', 'title','zone','created'));
$index->sortableFields(array('id','title','created','zone'));
$index->setAction('View','/admin/sliders/view/:Slider.id');
//$index->setAction('Random View','/admin/sliders/random_view/:Slider.zone');
$index->setAction('Edit','/admin/sliders/edit/:Slider.id');
$index->setAction('Delete','/admin/sliders/delete/:Slider.id',$this->helpers,__('Are you sure you want to delete this slider ?'));
$index->setAction(null,null,$this->helpers,false,true,'setStatus');
function setStatus($model,$slidersData)
{
	if($slidersData[$model]['published']==0)
	{
		$statusLink['title'] = __('Publish');
		$statusLink['url'] = '/admin/sliders/publish/'.$slidersData[$model]['id'];
	}
	else
	{
		
		$statusLink['title'] = __('Unpublish');
		$statusLink['url'] = '/admin/sliders/unpublish/'.$slidersData[$model]['id'];
	}
	return $statusLink;


}

echo $index->display($slidersData);
?>
